package com.payment.ktb.activity;

import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.payment.ktb.R;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by syd on 2016/8/2.
 */
public class ShowH5Activity extends BaseActivity {

    @BindView(R.id.wv_showh5)
    WebView wv_showh5;
    String url;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_showh5);
        ButterKnife.bind(this);
        url = getIntent().getStringExtra("url");
        wv_showh5.loadUrl(url);
        //支持js
        wv_showh5.getSettings().setJavaScriptEnabled(true);
        //解决显示不全的问题
        wv_showh5.getSettings().setDomStorageEnabled(true);
        wv_showh5.setWebViewClient(new HelloWebViewClient ());
    }



    private class HelloWebViewClient extends WebViewClient {
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            view.loadUrl(url);
            return true;
        }
    }




}
